//
//	This file provides the "C" interface to
//	the hex-view control. This allows a plain-C
//  win32 application to use our C++ implemented
//  hex-view window.
//
#include <windows.h>
#include "HexView.h"
#include "HexPrivate.h"

HexView *GetHexViewPtr(HWND hwnd)
{
	return (HexView *)GetWindowLong(hwnd, 0);
}

BOOL HexView_OpenFile(HWND hwnd, char *filename)
{
	HexView *hvp = GetHexViewPtr(hwnd);
	return hvp->OpenHexFile(filename);
}

BOOL HexView_CloseFile(HWND hwnd)
{
	HexView *hvp = GetHexViewPtr(hwnd);
	return hvp->CloseHexFile();
}